package calorie.com.calorie.api;


import calorie.com.calorie.request.ActivationUserRequest;
import calorie.com.calorie.request.AddUserRequest;
import calorie.com.calorie.request.ApplyLevelRequest;
import calorie.com.calorie.request.BaseRequest;
import calorie.com.calorie.request.BaseResponce;
import calorie.com.calorie.request.BuyAccelerateRequest;
import calorie.com.calorie.request.BuyGoodsRequest;
import calorie.com.calorie.request.CancelOrderRequest;
import calorie.com.calorie.request.ConsuptionRecordRequest;
import calorie.com.calorie.request.DrawCoinRequest;
import calorie.com.calorie.request.FirstLoginModifyPwdRequest;
import calorie.com.calorie.request.FirstLoginSendCodeRequest;
import calorie.com.calorie.request.ForgetLoginPasswordRequest;
import calorie.com.calorie.request.GoodsListRequest;
import calorie.com.calorie.request.GoodsOrderRequest;
import calorie.com.calorie.request.HashChargeRequest;
import calorie.com.calorie.request.LoginRequest;
import calorie.com.calorie.request.ModifyDealPwdRequest;
import calorie.com.calorie.request.ProfitRecordRequest;
import calorie.com.calorie.request.RecordRequest;
import calorie.com.calorie.request.SendCodeRequest;
import calorie.com.calorie.request.SportStastisticsRequest;
import calorie.com.calorie.request.SureOrderRequest;
import calorie.com.calorie.request.TransferAccountRequest;
import calorie.com.calorie.request.TransferRecordRequest;
import calorie.com.calorie.request.UpdateMoneyAddressRequest;
import calorie.com.calorie.request.UpdateNickNameRequest;
import calorie.com.calorie.request.UpdateReceivingAddressRequest;
import calorie.com.calorie.request.UpdateReceivingNameRequest;
import calorie.com.calorie.request.UpdateReceivingPhoneRequest;
import calorie.com.calorie.request.UpdateSexRequest;
import calorie.com.calorie.response.AccelerateResponce;
import calorie.com.calorie.response.ApplyLevelResponce;
import calorie.com.calorie.response.AssertInfomationResponce;
import calorie.com.calorie.response.BannerResponce;
import calorie.com.calorie.response.BuyAccelerateResponce;
import calorie.com.calorie.response.BuyGoodsResponce;
import calorie.com.calorie.response.CancelOrderResponce;
import calorie.com.calorie.response.ChargeDrawRecordResponce;
import calorie.com.calorie.response.ConsumptionRecordResponce;
import calorie.com.calorie.response.DrawCoinResponce;
import calorie.com.calorie.response.GoodsListResponce;
import calorie.com.calorie.response.GoodsOrderResponce;
import calorie.com.calorie.response.GradeResponce;
import calorie.com.calorie.response.InviteFriendResponce;
import calorie.com.calorie.response.NoticeListResponce;
import calorie.com.calorie.response.NoticeResponse;
import calorie.com.calorie.response.ProfitRecordResponce;
import calorie.com.calorie.response.RealNameResponce;
import calorie.com.calorie.response.ResultDTO;
import calorie.com.calorie.response.SportStastisticsResponce;
import calorie.com.calorie.response.SureOrderResponce;
import calorie.com.calorie.response.TodayProfitResponce;
import calorie.com.calorie.response.TransferAccountResponce;
import calorie.com.calorie.response.TransferRecordResponce;
import calorie.com.calorie.response.UserInfoResponce;
import calorie.com.calorie.response.UserSportResponse;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Headers;
import retrofit2.http.POST;

public interface ApiService {
    @Headers({
            "Content-Type: application/json",
            "Accept: application/json",
    })

    /**
     * 登录
     */
    @POST("/user/login")
    Call<ResultDTO> login(@Body LoginRequest request);

    /**
     * 忘记登录密码
     */
    @POST("/user/forgetLoginPassword")
    Call<ResultDTO> forgetLoginPassword(@Body ForgetLoginPasswordRequest request);

    /**
     * 忘记登录密码，发送验证码
     */
    @POST("/user/sendCode")
    Call<ResultDTO> sendCode(@Body SendCodeRequest sendCode);

    /**
     * 第一次登录
     * 发送验证码
     */
    @POST("/user/sendCode")
    Call<BaseResponce> firstLoginSendCode(@Body FirstLoginSendCodeRequest data);

    @POST("/user/firstLogin")
    Call<BaseResponce> firstLoginModifyPwd(@Body FirstLoginModifyPwdRequest data);

    //激活账户
    @POST("/user/activationUser")
    Call<ResultDTO> activationUser(@Body ActivationUserRequest data);

    //添加用户
    @POST("/user/addUser")
    Call<ResultDTO> addUser(@Body AddUserRequest data);

    //修改昵称
    @POST("/user/updateNickName")
    Call<ResultDTO> updateNickName(@Body UpdateNickNameRequest data);

    //修改性别
    @POST("/user/updateSex")
    Call<ResultDTO> updateSex(@Body UpdateSexRequest data);

    //修改收货姓名
    @POST("/user/updateReceivingName")
    Call<ResultDTO> updateReceivingName(@Body UpdateReceivingNameRequest data);

    //修改收货电话
    @POST("/user/updateReceivingPhone")
    Call<ResultDTO> updateReceivingPhone(@Body UpdateReceivingPhoneRequest data);

    //修改收货地址
    @POST("/user/updateReceivingAddress")
    Call<ResultDTO> updateReceivingAddress(@Body UpdateReceivingAddressRequest data);


    //修改钱包地址
    @POST("/user/updateMoneyAddress")
    Call<ResultDTO> updateMoneyAddress(@Body UpdateMoneyAddressRequest data);

    //得到资产信息
    @FormUrlEncoded
    @POST("/userAssets/getUserAssets")
    Call<AssertInfomationResponce> getUserAssets(@Field("userId") int userId);

    //商城  查询商品列表
    @POST("/goods/findGoodsByPage")
    Call<GoodsListResponce> getGoodsList(@Body GoodsListRequest data);

    //商城  用户购买商品接口
    @POST("/goods/buyGoods")
    Call<BuyGoodsResponce> buyGoods(@Body BuyGoodsRequest data);

    //商品  查询订单   待发货  、   已发货    、   待确认    、   已完成   共用一个实体   传入statu不同用以区分
    @POST("order/findGoodsByPage")
    Call<GoodsOrderResponce> goodsOrders(@Body GoodsOrderRequest data);

    //商品  取消订单
    @POST("order/cancelOrder")
    Call<CancelOrderResponce> cancelOrders(@Body CancelOrderRequest data);

    //商品  确认订单
    @POST("/order/confirmOrder")
    Call<SureOrderResponce> sureOrders(@Body SureOrderRequest data);

    /**
     * 修改登录密码
     *
     * @param data
     * @return
     */
    @POST("/user/updateLoginPassword")
    Call<ResultDTO> updateLoginPassword(@Body BaseRequest data);

    /**
     * 修改交易密码
     *
     * @param data
     * @return
     */
    @POST("/user/updateDealPassword")
    Call<ResultDTO> updateDealPassword(@Body ModifyDealPwdRequest data);

    /**
     * 转帐
     *
     * @param request
     * @return
     */
    @POST("userAssets/transfer")
    Call<TransferAccountResponce> transferAccount(@Body TransferAccountRequest request);

    /**
     * 根据帐户查询对方帐户
     *
     * @param account
     * @return
     */
    @FormUrlEncoded
    @POST("user/findRealNameByAccount")
    Call<RealNameResponce> getRealName(@Field("account") String account);

    /**
     * 输入hash值充值
     *
     * @param request
     * @return
     */
    @POST("userAssets/queryRechargeResult")
    Call<TransferAccountResponce> hashCharge(@Body HashChargeRequest request);

    /**
     * 提币
     *
     * @param request
     * @return
     */
    @POST("userAssets/put")
    Call<DrawCoinResponce> drawCoin(@Body DrawCoinRequest request);

    /**
     * 获取首页公告
     *
     * @return
     */
    @POST("notice/findLastNotice")
    Call<NoticeResponse> getNotice();

    /**
     * 首页banner
     *
     * @return
     */
    @POST("notice/getFirstPagePic")
    Call<BannerResponce> getHomeBanner();

    /**
     * 公告列表
     *
     * @return
     */
    @FormUrlEncoded
    @POST("notice/noticeList")
    Call<NoticeListResponce> getNoticeList(@Field("pageNo") int pageNo);

    /**
     * 查询下线
     *
     * @param userId
     * @return
     */
    @FormUrlEncoded
    @POST("user/getSubordinate")
    Call<InviteFriendResponce> getDownLineList(@Field("userId") int userId);


    /**
     * 充提币记录
     *
     * @param request
     * @return
     */
    @POST("rechargePutLog/findMyRechargePutList")
    Call<ChargeDrawRecordResponce> chargeDrawCoinRecord(@Body RecordRequest request);

    /**
     * 转帐记录
     *
     * @param request
     * @return
     */
    @POST("transferLog/findMyTransferLog")
    Call<TransferRecordResponce> transferRecord(@Body TransferRecordRequest request);

    /**
     * 查询收益
     *
     * @param userId
     * @return
     */
    @FormUrlEncoded
    @POST("userAssets/findTodayProfit")
    Call<TodayProfitResponce> getTodayProfit(@Field("userId") int userId);

    /**
     * 购买加速
     *
     * @param request
     * @return
     */
    @POST("accelerate/buyAccelerate")
    Call<BuyAccelerateResponce> buyAccelerate(@Body BuyAccelerateRequest request);

    /**
     * 加速信息
     *
     * @param userId
     * @return
     */
    @FormUrlEncoded
    @POST("accelerate/findAccelerateByUserId")
    Call<AccelerateResponce> accelerateList(@Field("userId") int userId);

    /**
     * 查询等级信息
     *
     * @param userId
     * @return
     */
    @FormUrlEncoded
    @POST("user/getApply")
    Call<GradeResponce> queryGradeMsg(@Field("userId") int userId);

    /**
     * 申请升级等级
     *
     * @param request
     * @return
     */
    @POST("user/addApply")
    Call<ApplyLevelResponce> applyLevel(@Body ApplyLevelRequest request);

    /**
     * 获取用户个人信息
     *
     * @param userId
     * @return
     */
    @FormUrlEncoded
    @POST("user/getUserInfo")
    Call<UserInfoResponce> getUserInfo(@Field("userId") int userId);

    @POST("userSport/saveSportData")
    Call<UserSportResponse> saveSportData(@Body BaseRequest data);


    /**
     * 运动统计
     *
     * @param request
     * @return
     */
    @POST("userSport/findUserSportByUserId")
    Call<SportStastisticsResponce> getSportsData(@Body SportStastisticsRequest request);


    /**
     * 修改蓝牙设备信息
     *
     * @param request
     * @return
     */
    @POST("userAssets/updateBLEInfo")
    Call<ResultDTO> updateBLEInfo(@Body BaseRequest request);

    /**
     * 查询购买加速所需要的价格
     */
    @POST("accelerate/getAcceleratePrice")
    Call<ResultDTO> getAcceleratePrice();

    /**
     * 获取用户当天的运动数据
     *
     * @param
     * @return
     */
    @FormUrlEncoded
    @POST("userSport/findUserTodaySportData")
    Call<ResultDTO> findUserTodaySportData(@Field("userId") int userId);

    /**
     * 收益记录
     *
     * @param request
     * @return
     */
    @POST("incomeLog/findInComeLogsByUserId")
    Call<ProfitRecordResponce> queryProfitRecord(@Body ProfitRecordRequest request);

    /**
     * 消费记录
     *
     * @param request
     * @return
     */
    @POST("recordLog/findRecordLogByUserId")
    Call<ConsumptionRecordResponce> queryConsumptionRecord(@Body ConsuptionRecordRequest request);

    /**
     * 消费记录
     *
     * @param request
     * @return
     */
    @POST("user/loginHeartbeat")
    Call<BaseResponce> loginHeartbeat(@Body BaseRequest request);

    /**
     * 修改手机号，发送验证码
     *
     * @param request
     * @return
     */
    @POST("user/sendCode")
    Call<ResultDTO> modifyPhoneSendCode(@Body BaseRequest request);

    /**
     * 修改手机号，验证登录信息
     *
     * @param request
     * @return
     */
    @POST("user/modifyPhoneOne")
    Call<ResultDTO> modifyPhoneOne(@Body BaseRequest request);

    /**
     * 修改手机号，确定修改
     *
     * @param request
     * @return
     */
    @POST("user/modifyPhoneTwo")
    Call<ResultDTO> modifyPhoneTwo(@Body BaseRequest request);

    /**
     * 修改手机号，确定修改
     *
     * @param request
     * @return
     */
    @POST("user/sendCode")
    Call<ResultDTO> modifyPhoneThree(@Body BaseRequest request);


    @POST("system/getAndroidVersion")
    Call<ResultDTO> getAndroidVersion(@Body BaseRequest request);


}
